<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> ${title} </title>

	<meta http-equiv="keywords" content="${keyword}" />
	<meta http-equiv="description" content="${description}" /> 
		<script type="text/javascript" src="../../script/jquery.js"></script>
		<script type="text/javascript" src="../../script/PopBox.js"></script>
		<link href="../../themes/css/index.css" rel="stylesheet" type="text/css" />
		<link href="../../themes/css/subchannel.css" rel="stylesheet" type="text/css" />
		<link href="../../themes/flexigrid/css/thickbox.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="../../script/tueyeutiljs.js"></script>
		<script src="../../script/grid/thickbox.js" type="text/javascript"></script>
	 

<style type="text/css">
<!--
#hua a,#soucang a{
 color:red;
  text-decoration:none;
}
#biaoqing{
 
 height:60px;
 
}
-->
</style>　
 <script type="text/javascript">
 var commentpid ;
 	$(document).ready(function(){   
 　 		 
 		var topicid = {topicid:"${topicid}"}
  		$.ajax({ 
			url: "../../topicclick.do" ,
			type:'post', //数据发送方式 
			dataType:'json', //接受数据格式 
			data: topicid ,  
			success:update_page2 //回传函数(这里是函数名)   error转向错误页面
            }); 
            
            
             $("#shoucang").bind("click", function(){
             var topicid = {topicid:"${topicid}"}
            $.ajax({
            type:"POST",
            url: "../../shoucang.do", 
            dataType:'html', //接受数据格式
            async: false,
            data: topicid,

            success: function(data){ 
           
                    alert("收藏成功！");
                 
                },
           error:function(data){
             alert(data);
           }
            }) 
          }) 
            
　　　});   
 	
   function changepin(aobj){
    commentpid = aobj;
    var str = $('#'+aobj).text(); 
     if(str.length == 0){ 
       var str2 = aobj.substring(2);
       var sendData="pid="+str2;
       $.ajax({ 
			url: "../../loadcomments.do" ,
			type:'post', //数据发送方式 
			dataType:'json', //接受数据格式 
			data: sendData , 
			// beforeSend: function() {$("<img src='../images/wait18.gif' />").appendTo("#DivTblContact")},  
			success:update_page //回传函数(这里是函数名)   error转向错误页面
            });   
       $('#'+aobj).hide();
     }  
      $('#'+aobj).toggle();  
   }
   
    function update_page(obj) { //ajax保存成功后,触发 id为rain 的onclick事件
    	var tablestr = "<table>"; 
    	if(obj.comments.length != 0){
        for(data in obj.comments){
           	  var bean = obj.comments[data];
           	  tablestr += "<tr><td>"+bean.lou+"</td><td><img src='../../pages/topics/usermanager/userphoto/"+bean.comment[2]+"' width='50' height='50' />"
           	               +"<br/>"+bean.comment[1]+"</td><td>"+bean.comment[3]+"<br/><span>"+bean.comment[0]+"</span></td></tr>";    	    
    	    
    	  }
    	   tablestr +="</table>";
    	  }else {
    	 　 alert("此图片暂无评论");
    	   tablestr = "";
    	  }
    	 
    	 $(tablestr).appendTo($('#'+commentpid)); 
     } 		
       
       function publiscomment_f(obj){
       		document.getElementById('pictureid').value=obj;
       		$('#username').focus(); 
       }
       function sendSubmit(){
         var picturid = $('#pictureid').val();
         var username = $('#username').val();
         var commenttext = $('#commenttext').val();
         if(commenttext.length == 0){
          alert("评论内容不能为空");
          $('#commenttext').focus();
          return;
         }
         if(picturid.length == 0){
          alert("你如果想对哪个图片，请点击对应图片下面的'发表评论'！");　
          return;
         }
         var commentData = "picturid="+picturid+"&username="+username+"&commenttext="+commenttext;
         $.ajax({ 
			url: "../../publiscomments.do" ,
			type:'post', //数据发送方式 
			dataType:'json', //接受数据格式 
			data: commentData , 
			// beforeSend: function() {$("<img src='../images/wait18.gif' />").appendTo("#DivTblContact")},  
			success:publish_page //回传函数(这里是函数名)   error转向错误页面
         　});
         
       }
       function publish_page(obj){
        if(obj == 1){
          alert("发表成功！");
         　  window.location.reload();
        }else{
          $('#loginorregister').trigger('click');
        }
       }
       
       function update_page2(data){ 
           if(data.username == null){
        	  var nologinstr =  "<a href='../../index.html'>首页</a>&nbsp;|&nbsp;<a href='../../pages/topics/usermanager/register.jsp'>快速注册</a>&nbsp;|&nbsp;<a href='../../pages/topics/usermanager/userlogin.jsp'>登录</a>&nbsp;|&nbsp;<a href='#' onClick ='javascript:window.external.AddFavorite(document.URL,document.title);return false'>收藏</a>";
         	  $('#info').html("");
          　	  $(nologinstr).appendTo($('#info')); 
           }else{
                var str = "<a href='../../index.html'>首页</a>&nbsp;|&nbsp;<a href='../../userblog.do?userid="+data.userid+"'>"+data.username+"</a>&nbsp;|&nbsp; <a href='../../userinfoset.do'>管理中心</a> &nbsp;|&nbsp; <a href='../../userexit.do' >退出</a>&nbsp;|&nbsp;<a href='#' onClick ='javascript:window.external.AddFavorite(document.URL,document.title);return false'>收藏</a>";
               $('#info').html("");
               $(str).appendTo($('#info')); 
           }  
       }
       
       function loginout(){
       $.ajax({
            type:"POST",
            url: "../../userlogin.do?action=loginout", 
            dataType:'html', //接受数据格式 
            success: function(data){ 
             	 window.location="../../index.html";
                } 
			 
	    })
       }
       function clickbiaoqing(obj){  
         if(obj == 1){
          insertText(":daxiao:");
         }else if(obj == 2){
          insertText(":jingya:");
         }else if(obj == 3){
           insertText(":sharen:");
         }else if(obj == 4){
           insertText(":henku:");
         }else if(obj == 5){
           insertText(":kule:");
         }else if(obj == 6){
          insertText(":wuli:");
         }else{
          insertText(":yawen:");
         } 
       }
       function insertText(str){ 
          var att =  document.getElementById('commenttext').innerText; 
          document.getElementById('commenttext').innerText = att+str;
       }
      
</script>
 <script type="text/javascript" src="http://js.tongji.linezing.com/1110261/tongji.js"></script><noscript><a href="http://www.linezing.com"><img src="http://img.tongji.linezing.com/1110261/tongji.gif"/></a></noscript>
</head>

<body>
<div style="display:none;">
		<input type="button" id="cssrain" href="../../pages/topics/usermanager/sendflower.jsp?height=220&amp;width=280&amp;topicid=${topicidforflower}" title="选一朵鲜花吧" class="thickbox" value="aaa" />
		<input type="button" id="loginorregister" href="../../pages/topics/usermanager/openuserloginorgister.jsp?height=280&amp;width=350" title="登录/注册" class="thickbox" value="bbb" />
 </div>	
  <div id="hearder">
<div id="banner">
<div id="logoHome"><img src="../../themes/images/tueyelogo.gif"　 /></div> 
</div>
<div id="info">　

</div>
<div id="nevigation">
<ul>
<div class="focused"><a href="../../index.html" title="首页">首页</a></div>
<li><a href="../../fmls/index.html" title="饭没了秀">饭没了秀</a></li>
<li><a href="../../bfwb/index.html" title="变废为宝">变废为宝</a></li>
<li><a href="../../shss/index.html" title="时尚生活">时尚生活</a></li>
<li><a href="../../ssln/index.html" title="似水流年">似水流年</a></li>
<li><a href="../../dtts/index.html" title="道听图说">道听图说</a></li>
<li><a href="../../wxws/index.html" title="我形我秀">我形我秀</a></li>
<li><a href="../../gxtt/index.html" title="搞笑贴图">搞笑贴图</a></li>
</ul>
</div>
</div>
<div id="container">
<div id="mainbody">
<div id="sub_left">
<div id="daohang">${daohang}</div>
<div id="sub_left_title_fin"><h1>${pagetitle}</h1></div>
<div id="sub_left_main_fin">
<div id="contectheander">
点击数：${countnum}  &nbsp;&nbsp;&nbsp;&nbsp;发布日期: ${time} &nbsp;&nbsp;&nbsp;&nbsp;作者: ${author}
&nbsp;&nbsp;&nbsp;&nbsp;<span id="hua"><a href="#" onclick="javascript:$('#cssrain').trigger('click');"><img src='../../themes/images/21.gif' />表扬一下</a></span>
&nbsp;&nbsp;&nbsp;&nbsp;<span id="soucang"><a href="#" id='shoucang'><img src='../../themes/images/soucang.gif' />收藏她</a></span>
</div>
<p class="pfin">
${overview}
</p>
<ul> 
 ${showmain}
</ul>
</div>
<div id="sub_left_page">

<div class="flickr"> 
${pagenum}　<br/><br/>
　${upnext}
 </div>
 
 <div id="publiccommentid" >
<p>
发表评论
</p>
<table id="publishcom"> 
 <tr>
<td>内容:</td>
<td>
<ul id="biaoqing">
<li><img src="../../themes/images/biaoqing/daxiao.gif" id="daxiao" alt="大笑" title="大笑" onclick="clickbiaoqing(1);"/></li>
<li><img src="../../themes/images/biaoqing/henku.gif" id="henku" alt="很酷" title="很酷" onclick="clickbiaoqing(4);"/></li>
<li><img src="../../themes/images/biaoqing/jingya.gif" id="jingya" alt="惊呀" title="惊呀" onclick="clickbiaoqing(2);"/></li>
<li><img src="../../themes/images/biaoqing/kule.gif" id="kule" alt="哭了．．" title="哭了．．" onclick="clickbiaoqing(5);"/></li>
<li><img src="../../themes/images/biaoqing/sharen.gif" id="sharen" alt="杀人" title="杀人" onclick="clickbiaoqing(3);"/></li>
<li><img src="../../themes/images/biaoqing/wuli.gif" id="wuli" alt="没有办法" title="没有办法" onclick="clickbiaoqing(6);"/></li>
<li><img src="../../themes/images/biaoqing/yiwen.gif" id="yiwen" alt="不明白" title="不明白" onclick="clickbiaoqing(7);"/></li>
</ul>
<br/>
<textarea rows="10" cols="40" name="commenttext" id="commenttext"></textarea>
<input type="hidden" name="pictureid" id="pictureid" /> 
</td>
</tr>
<tr>

<td colspan="2">
 
 <input type="button" value="发出评论" id="commentsubmit" onclick="sendSubmit();"/></td>
</tr>
</table>
</div>
</div>
</div>
<div id="sub_right">
<div id="sub_right_item">
<!--div id="sub_right_item_title">推荐图片</div -->
<div id="sub_right_item_cnt2"><ul>
<li><a href="../../publish.do"  ><img src="../../themes/images/new_news.gif" /></a></li>
<li><a href="../../usertopicmanager.do"><img src="../../themes/images/my_news.gif" /></a></li>
 
</ul></div></div>
<div id="sub_right_item">
<div id="sub_right_item_title">相关图片</div>
<div id="sub_right_item_cnt"><ul>
 ${xiangguan} 
</ul></div></div>
 
</div>
</div>
</div>

<div id="tailer">

			<div id="aboutUs">
				<ul>
					<li>
						<a href="javascript:alert('暂无描述')">关于tueye</a>
					</li>
					<li>
						<a href="../../pages/topics/service/ad.jsp">广告服务</a>
					</li>
					<li>
						<a href="../../pages/topics/service/frilink.jsp">友情连接</a>
					</li>
					<li>
						<a href="../../pages/topics/service/sitemap.jsp">网站地图</a>
					</li>
					<li>
						<a href="javascript:alert('暂无描述')">帮助中心</a>
					</li>
				</ul>
			</div>
			<div id="copyRight">
				 ©2009 www.tueye.com, All Rights Reserved.  备案号 
			</div>
		</div>
</body>
</html>
